#ifndef __CMYANIM_INFO_H
#define __CMYANIM_INFO_H

#include "cocos2d.h"

using namespace cocos2d;

#define DEF_ANIM_NAME	"my_anim"

class CMyAnimInfo : public CCObject
{
public :
	CMyAnimInfo(void);
	CMyAnimInfo(const char *pName);
	~CMyAnimInfo(void);

protected :
	CCArray * m_pFrameList;
	int m_nCurrFrame;
	int m_nFrames;
	float m_fFrameRate;
	float m_fLastTime;
	bool m_bLoop;
	bool m_bPlay;
	char *m_pName;
	CCPoint **m_pMoveStep;
	bool m_bCopyData;

public :
	virtual CCObject* copyWithZone(CCZone* pZone);
	void initDataCopy(CCArray *pFrameList, int nFrames, float rate, bool bLoop, char *pName);
	void init(const char *pFilename, int fWidth, int fHeight, int nframe, float rate, bool multi_file, bool loop, bool framecache);
	bool nextFrame(void);
	void reset(void);
	bool isAniOver(void);
	void setPlay(bool bPlay);
	float static getTimeTick(void);
	CCSpriteFrame* getCurrentFrame(void);
	int getCurrFrameIdx(void) { return m_nCurrFrame; }
	CCPoint *getNextMoveStep(void);
};
#endif // __CMYANIM_INFO_H